# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=blinken
pkgver=23.08.4
pkgrel=0
# armhf blocked by extra-cmake-modules
# s390x blocked by kxmlgui
arch="all !armhf !s390x !riscv64"
url="https://edu.kde.org/blinken/"
pkgdesc="Memory Enhancement Game"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	kcrash5-dev
	kdbusaddons5-dev
	kdoctools5-dev
	kguiaddons5-dev
	ki18n5-dev
	kxmlgui5-dev
	phonon-dev
	qt5-qtbase-dev
	qt5-qtsvg-dev
	samurai
	"
_repo_url="https://invent.kde.org/education/blinken.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/blinken-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
119b9d8d253d2b79c22bd83e045b01c61201c2ef8cbf9083e2ec10b6fde02aabfb63daa800be89c3e40f6138287c6aef91f147fa478b4c15e33318d76a93f679  blinken-23.08.4.tar.xz
"
